Coding method and recording and reproducing apparatus

ABSTRACT

A method for coding a video signal made up of a plurality of sequential video frames. First, correspondence information relating color frame information values to types of video coding is provided, the color frame information values and types of coding being related on a one to one basis such that for each value of color frame information there is only one corresponding type of coding. Next, a value of color frame information is determined for each video frame and the type of coding to be used on the frame is selected by associating the frame&#39;s color frame information with a coding type via the correspondence information. Finally, the image frames are coded according to the coding types selected by referencing the correspondence information.

This application is a division of Ser. No. 08/720,971 filed Oct. 16,1996.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a coding method and a recording andreproducing apparatus, and is for example, preferable for compressingand coding, recording, decoding, and reproducing a moving image signal.

2. Description of the Related Art

Conventionally, in the case where a moving image signal is transmittedto a remote place in a video conference system or a video telephonesystem or the like, the image signal is compressed and coded by usingline correlation and frame correlation for effective use of thetransmission path. The similar method is applied to a video recordingand reproducing system using a recording media, such as a hard disk, andan MO disk for increasing a recording time per unit capacity. Forexample, when frame correlation is used, the amount of information canbe compressed by performing orthogonal conversion such as discretecosine transform (DCT) to an image signal with respect to a macro blockwhich is divided from a frame screen and quantizing it.

In the compression coding of a moving image signal using suchcorrelation between frames, one compression sequence can be completed inan image frame unit which is referred to as a GOP (Group of Pictures).

For example, when a GOP comprises two frame units, one sequence iscompleted by compressing and coding the images in the two frames in theform of an I-picture and a B-picture. When a GOP comprises four frameunits, one compression sequence is completed by compressing and codingthe images in the four frames into an I-picture, a B-picture and aP-picture.

The I-picture represents an image frame coded as it is by using, forexample, the DCT (Discrete Cosine Transform) coding. The B-picturerepresents an image frame which is decoded by prediction between framesusing a frame present in the forward and backward bidirections. TheP-picture represents an image frame which is decoded by predictionbetween frames using a frame which is present in one direction.

Generally, the images in frames adjacent in time do not show a largechange. Therefore, the I-picture is used as a reference frame image, andthe B- and P-pictures are formed by extracting the differences from theI-picture. At the time of decoding, parts other than the differences areinterpolated by prediction using both the forward and backward directionby using the I-picture as a reference image. In this manner, a videosignal can be efficiently compressed and coded. Incidentally, since theB-picture and the P-picture can be decoded by prediction using theI-picture, one I-picture must be present without fail in one GOP.

Furthermore, since the B-picture is decoded by prediction based on aboth forward and backward direction frame and the P-picture is decodedby prediction based on a one direction frame respectively, the I-picturemust be restored first into each image frame in the compressed and codedGOP.

Here, in the compressed moving image data, the frame order is replacedbecause the image data is restored in the order of transmission andrecording.

For example, as shown in FIG. 1, in one GOP unit which formed of foursubsequent image frames, with respect to each of the image frames, whichare input in the order of frame A1, frame A2, frame A3 and frame A4, theframe order of each image frame is replaced in accordance with thecoding form which is used in the compression coding. Here, frames A1 andA3 represent image frames which are coded in the B-picture, frame A2represents an image frame coded in the I-picture. Frame A4 represents animage frame coded in the P-picture.

The image frames, which are input in the order of frame A1, frame A2 andframe A3, and frame A4 are rearranged into the order of frame A2, frameA1, frame A4 and frame A3 at the time of the coding process. Each imageframe which is coded and transmitted or recorded is rearranged back intothe original order at the time of decoding.

In other words, since the image frames, which have been rearranged intothe order of frame A2, frame A1, frame A4 and frame A3, are decoded inthe order of transmission and recording, frame A2 (which comprises theI-picture) is decoded first followed by the decoding of frame A1(comprising the B-picture) on the basis of the decoding of frame A2.Then frame A4 (which comprises the P-picture) is decoded on the basis offrame A2, and lastly, frame A3 is decoded on the basis of frame A1 andframe A4. Each of the image frames decoded in this manner are replacedback into the original image frame order at the time of decoding and aredisplayed on a monitor or the like.

In this manner, each image frame is replaced immediately after or soonafter the image frame which constitutes the reference for prediction atthe time of coding so that each image frame is transmitted and recordedwith the result that the image frame which constitutes an object can bedecoded immediately after the image frame which constitutes thereference is decoded at the time of decoding. Consequently, the timerequired for the decoding process can be shortened, thereby avoiding adelay in the image display.

In the compression coding of a moving image signal using correlationbetween frames, each image frame is compressed and coded for each GOPunit by a technique such that the editing of image frames for one GOPunit and the random access for one GOP unit are enabled from thecompression moving image data.

By the way, in the compressed video data which has coded for every GOPunits, such as GOP sequence information showing that each frame beforecoded is coded in which of I-, B-, or P-picture, and which correspondsto what number of frame in GOP, is added.

These information are referred at the time of decoding, but they are notneeded after decoding in general.

On dubbing, however, in the case where a moving image signal passedthrough compression coding/decoding process is compressed and codedagain by using a similar compression algorithm, in view of frames of amoving image, differences are appeared in image quality after dubbing inaccordance with that whether the relative position of a frame in one GOPsequence is the same or not at the first and the second compressing andcoding. As to image quality after dubbing, the deterioration ofimage-quality can be suppressed extremely when the first and the secondcorrespondence relations of a moving image being an original image andthe GOP sequence are coincided with each other.

Therefore, it is good to add the moving image signal passed throughcompression coding and decoding, the GOP sequence information which hasused at this time and transmit it, and when it is compressed again by adubbing device, it is good to compress the moving image with referringto the transmitted GOP sequence information so as to correspond to theGOP sequence at the last time.

The transmitting format of an image signal, however, is so constitutedthat GOP sequence information cannot be transmitted in general, thusthere is a problem that GOP sequence information cannot be transmittedfor improving image quality on dubbing.

SUMMARY OF THE INVENTION

In view of the foregoing, an object of the present invention is toprovide a coding method and a recording and reproducing apparatuswherein the GOP sequence can be stored without including the GOPsequence information in a compressed and decoded image signal.

The foregoing objects and other objects of the invention have beenachieved by the provision of a recording and reproducing apparatus forcompressing and coding an input video signal to record on apredetermined recording medium, and for reproducing the compressed andcoded video signal from the recording medium to decode it, the apparatuscomprises extracting means for extracting color frame information fromvideo frames of the input video signal and the compressed video signaloutputted from the recording medium, control means for storingcorrespondence information which shows the correspondence relationbetween compression information, which is needed when the video signalis compressed and coded, and the color frame information, to control thecoding of the video image based on the correspondence informationaccording to the compression information which is corresponding to theextracted color frame information, and adding means for adding the colorframe information extracted by the extracting means to the compressedand coded video signal and the decoded video signal.

Further, in the present invention, a recording and reproducing apparatusfor recording an input video signal onto a predetermined recordingmedium and for reproducing the video signal from the recording medium,the apparatus comprises extracting means for extracting color frameinformation from the input video signal, coding means for performingcompression coding to the video signal by using a frame correlation,coding control means for storing correspondence information which showsthe correspondence relation between the color frame informationextracted by the extracting means and compression information, which isneeded in compression coding by the coding means, to control the codingof the coding means based on the correspondence information according tothe compression information which is corresponding to the color frameinformation outputted from the extracting means, adding means for addingthe color frame information extracted by the extracting means to thevideo signal compressed and coded by the coding means, recording meansfor recording the video signal supplied from the adding means onto thepredetermined recording medium, and reproducing means for extracting thecolor frame information from the video signal recorded on the recordingmedium and decoding the video signal, and for adding the color frameinformation to the decoded video signal to output it.

In the present invention, a coding method of compressing and coding avideo signal by using a frame correlation comprises a first step ofplacing the fixed number of image frames in the same order of frames ineach GOP, which is plurally formed per the fixed image frames when thevideo signal is coded, a second step of setting so that each GOP isprocessed in the same GOP sequence, a third step of settingcorrespondence information in which color frame information added to thevideo signal and plural GOP sequences are made to correspond on a one toone basis, and a fourth step of making the GOP sequence correspond tothe color frame information based on the correspondence information tocode the video signal.

The nature, principle and utility of the invention will become moreapparent from the following detailed description when read inconjunction with the accompanying in which like parts are designated bylike reference numerals or characters.

BRIEF DESCRIPTION OF THE DRAWINGS

In the accompanying drawings:

FIG. 1 is a flowchart for explaining frame exchange in coding usingcorrelation between frames in case of being GOP=4-frame;

FIG. 2 is a block diagram showing a structure of a recording and playingback apparatus according to an embodiment;

FIG. 3 is a table showing an example of correspondence between CFinformation and GOP sequence;

FIG. 4 is a flowchart showing a procedure for a compression coding anddecoding process using CF information;

FIG. 5 is a flowchart showing a procedure for a compression coding anddecoding process using CF information; and

FIG. 6 is a flowchart for explaining frame exchange in coding usingcorrelation between frames in case of being GOP=2-frame.

DETAILED DESCRIPTION OF THE EMBODIMENT

Preferred embodiment of the present invention will be described withreference to the accompanying drawings:

In FIG. 2, reference numeral 1 denotes a recording and playing backapparatus as a whole which is constituted so that a NTSC compositesignal to be input is compressed, coded, and recorded and is then outputafter being played back and decoded.

The recording and playing back apparatus 1 supplies the input NTSCcomposite signal Si to an NTSC decoder 2. The NTSC decoder 2 decodes theNTSC composite signal Si into a component SDI signal S2 to supply thesignal to an MPEG encoder 3 and a video index decoder 4. The video indexdecoder 4 extracts a color frame (CF) information signal S3 from thevideo index signal which is added to the head of each field data of thesupplied component SDI signal S2 and supplies it to the recording systemcontrol part 5. In this connection, the SDI format is a standard of anaudio signal and a video signal in digital format which is standardizedby the SMPTE (Society of Motion Picture and Television Engineers) -259M.

Here, the CF information signal S3 is a signal that indicates the CFinformation which is conventionally included in the NTSC compositesignal S1. In addition, when the NTSC composite signal S1 is convertedto the component SDI signal S2, the signal is coded and included in thevideo index signal positioned at the head of each field. When the CFinformation signal S3 is expressed, for example, in four bits, thesignal changes in a successive manner such as from "0000" to "0001", and"0010" in successive field A1-1 (the first field of frame A1), fieldA1-2 (the second field of frame A1), and field A2-1 (the first field offrame A2) or the like. At the same time, the signal comprises a bitpattern wherein the pattern is repeated in a definite cycle.

A table shown in FIG. 3 shows the corresponding information of a bitpattern of the CF information and the corresponding GOP sequenceprocess. The recording and playing back apparatus 1 allows respectivebit patterns represented in the CF information to correspond to thecoding method by the GOP sequence and the frame order. Here, CFrepresents a bit pattern denoted by the CF information. Symbol F denoteshow many frames there are before the coding of the frames in the GOP andthe frame is in which field. In addition, symbol H denotes the form inwhich the image frames will be coded or are coded. The correspondenceshown here is given for the case where the number of image frames in theGOP is two.

For example, in the case where the bit pattern is "0000" or "0001", itis shown that the position of the image frame in the GOP before thecoding is the first frame A1 and, at the same time, the image frame is aframe which will be coded or is coded in the B-picture. In addition, inthe case where the bit pattern is "0010" or "0011", it is shown that theposition of the image frame in the GOP before the coding is the secondframe A2.

The recording system control part 5 is preliminarily set by memorizingsuch correspondence information (FIG. 3) in a memory (not shown)provided inside thereof so that the GOP sequence process according tothe bit pattern shown in the CF information signal S3 supplied from thevideo index decoder 4 is selected by referring to the correspondenceinformation (FIG. 3). The recording system control part 5 sends acontrol signal S4 corresponding to the selected process to the MPEGencoder 3. Furthermore, the control part 5 sends the supplied CFinformation signal S3 to the CF information adding part 6.

The MPEG encoder 3 subjects the supplied component SDI signal S2 to theGOP sequence processing instructed by the control signal S4. In otherwords, for example, in the case where the bit pattern shown in the CFinformation signal S3 is "0000" or "0001", the bit pattern is coded intothe B-picture, and the frame is replaced as a second step in the GOP(FIG. 6). The MPEG encoder 3 subjects the component SDI signal S2 to thecoding process and frame exchange process for each image frame, and atthe same time, compressed data S5 is formed in the GOP unit to send thecompressed data S5 to the CF information adding part 6.

The CF information signal S3 with a phase which has been compensated thetime necessary for the compression process by the MPEG encoder 3 issupplied to the CF information adding part 6 from the recording systemcontrol part 5. The CF information adding part 6 forms compression dataS6 by adding this CF information signal S3 to the compressed data S5 tosend the compressed data to the error code adding part 7.

The error code adding part 7 adds an error code to the compressed dataS6 to send the compressed data S6 to an MO (Magneto-Optical) disk drive8. The MO disk drive 8 records the supplied compressed data S6 and at arequest from the outside plays back the compressed data S6 to send thedata to the error correction part 9.

The error correction part 9 corrects errors in the read data by usingthe error code added to the compressed data S6 if any such error isgenerated. In the case where an error is generated which cannot becorrected, an error flag bit is set in the data. After error treatment,the compressed data S6 is supplied to the MPEG decoder 10 and the CFinformation extracting part 11. The CF information extracting part 11extracts the CF information signal S7 from the compressed data S6 tosend the signal to a CF information delaying part 12. The CF informationdelaying part 12 delays the CF information signal S7 by the timenecessary for the decoding by the MPEG decoder 10 to output the CFinformation signal S7 having the phase in which the time necessary forthe decoding process is compensated.

The MPEG decoder 10 decodes the compressed data S6 based on a parameterincluded in the compressed data S6 to form a component SDI signal S8.The restored component SDI signal S8 is sent to the video index addingpart 13 to add the CF information signal S7, which is sent from the CFinformation delaying part 12. This CF information signal S7 provides aphase to compensate for the period of the restoration process by theMPEG decoder 10 with respect to the CF information signal S3.

The component SDI signal SB to which the CF information signal S7 isadded is converted into a NTSC composite signal S9 by the NTSC encoder14 to be output thereafter.

In this manner, the recording and reproducing apparatus 1 subjects amoving image signal which comprises an input NTSC composite signal S1 toa coding process according to the GOP sequence on the basis of theextracted CF information signal S3 and records it. The sequenceinformation is outputted to the reproduced image data in the form of CFinformation in the video index.

Further, in the case where the reproduced moving image data is dubbedonto a recording and reproducing apparatus 20, which has the samestructure as the aforementioned recording and reproducing apparatus 1,the component SDI signal S8 with an added CF information signal S7 froma terminal 13 provided between the video index adding part 15 and theNTSC encoder 14 is extracted to be supplied to the recording and playingback apparatus 20.

The recording and reproducing apparatus 20 can perform compressioncoding in a GOP phase same as one on compression at the last time byextracting the CF information signal S3 from the supplied component SDIsignal SB and referring to the CF information signal S3.

In the aforementioned structure, the recording and playing backapparatus 1 uses the CF information, which comprises a successively andregularly changing bit pattern and which is conventionally included inthe video index signal, in place of the GOP sequence information tosubject the input animated signal and the compressed moving image datato the compression coding and decoding process.

In other words, in Power-ON state, in the procedure as shown in FIGS. 4and 5, the procedure starts at step SP1. Next, the correspondenceinformation is set at the subsequent step SP2. The correspondenceinformation determines the relation between the bit pattern shown in theCF information and the corresponding GOP sequence process. For example,in the case where the CF information is shown in four bits in each imageframe in a GOP which constitutes one unit with two frames, the codingmethod is made to correspond to the respective bit patterns of fourfields of the CF information, namely "0000" through "0011".

The set content is memorized respectively in the recording systemcontrol part 5 and in the playing back system control part 12 (FIG. 2).Incidentally, the GOP sequence in each GOP is patterned so that the sameprocessing is carried out for each GOP. In other words, in the casewhere the frame A1 is coded in the B-picture in the first GOP, frame A1in subsequent GOP's is always coded into the B-picture.

At the subsequent step SP3, the image frame is read to the MPEG encoder3 or to the MPEG decoder 10. At step SP4, the CF information signal S3is extracted from the read image frame. The extracted CF informationsignal S3 is supplied to the recording system control part 5 or theplaying back system control part 12.

Subsequently, at step SP5, the bit pattern of the CF information signalS3 extracted in this manner is compared with the set correspondenceinformation (FIG. 3).

In the beginning, at step SP6, it is judged whether or not the bitpattern comprising four bits represented by the CF information signal S3is "0000". When the bit pattern is "0000", it is judged that the frameposition is the first frame A1 before the coding of the image frame whenthe CF information S3 is extracted, and at the same time, it is judgedthat the image frame will be coded in the B-picture. Otherwise theprocess proceeds to the next judging step SP7.

At step SP7, it is judged whether or not the bit pattern comprising fourbits represented by the CF information signal S3 is "0010". When the bitpattern is "0010", it is judged that the frame position of the imageframe in the GOP is the second frame A2 before the coding of the imageframe when the CF information signal S3 is extracted. At the same time,it is judged that the image frame will be coded in the I-picture.

In this manner, a GOP sequence process depending on the judgment resultwill be selected. The selected GOP sequence process is performed with aninstruction given from the recording system control part 5 to the MPEGencoder 3. Such processing is repeated for each image frame.

In this manner, the process in each GOP is patterned, and at the sametime, a compressed coding in which the GOP sequence is stored can berealized also in dubbing.

In the aforementioned structure, a CF information signal S3 comprising avideo pattern which continuously changes and at the same time which isrepeated in a definite cycle is extracted from a video index signal,which is added to the component SDI signal S2, is extracted for eachimage frame so that the compressed coding for the GOP sequence isperformed without referring to the GOP sequence information by referringto correspondence information which is preliminarily set by allowing thebit pattern represented by the CF information to correspond to the GOPsequence on a one to one basis.

In this manner, a coding method and a recording and reproducingapparatus 1 can be realized which are capable of coding a moving imagesignal with storing the GOP sequence without using the GOP sequenceinformation.

Incidentally, in the aforementioned embodiment, when the bit patterncomprising four bits represented in the CF information signal S3 is"0000" or "0001", it is judged that the frame position of the imageframe in the GOP was the first frame A1 before the coding of the imageframes into which the CF information signal S3 is extracted. At the sametime, there is described a case in which the image frame will be codedor is coded into the B-picture. The present invention is not limitedthereto. The bit patterns and the GOP sequence processes that correspondto them can be combined in any manner.

For example, in the case where the bit pattern made up of 4 bitsindicated in the CF information signal S3 is "0000" or "0001", it may bejudged that the frame position in the GOP was the second frame A2 beforethe coding of the image frames into which the CF information signal S3is extracted. At the same time, it may be judged that the image framewill be coded or is coded into the I-picture.

Furthermore, in the aforementioned embodiments, there is described acoding method, and a recording and reproducing apparatus 1 which arecapable of coding a moving image comprising a composite signal in theNTSC format on the basis of the CF information instead of a GOPsequence. However, the present invention is not limited thereto. Acoding method and a recording and reproducing apparatus may also be usedwhich execute GOP sequence processing on a moving image signalcomprising a composite signal in the PAL format.

However, in this case, it is necessary to exchange the NTSC decoder 2and the NTSC encoder 14 provided on the recording and playing backapparatus 1 with ones for PAL.

Furthermore, in the aforementioned embodiments, there is described acase in which the recording and playing back apparatus 1 uses arecording apparatus comprising an MO disk drive 8. However, the presentinvention is not limited thereto. A recording apparatus which usesanother recording medium may be used.

Furthermore, in the aforementioned embodiments, there is described arecording apparatus wherein one GOP unit comprises two frame imageframes. However, the present invention is not limited thereto. In thecase where a frame comprises the same number or a half number of thenumber of frames included in one color frame period, the present systemcan be applied. In concrete, in the NTSC format, GOP length applyingthis format is only two frame because color frame is concluded for fourfields, on the contrary, in the PAL format, this system can be appliedwhen GOP length is two frame or four frame because color frame isconcluded for eight fields.

As described above, in accordance with the present invention, a GOPsequence which corresponds to the color frame sequence informationextracted from the moving image and to the compressed moving image datais selected by using set information by arranging the image frames inthe same frame order in each of the plurality of GOP's and by settingeach of the GOP's so that each of the GOP's is processed in the same GOPsequence to set the color frame sequence information to correspond tothe GOP sequence on a one to one basis, with the result that the codingprocess and the decoding process can be realized by means of theselected GOP sequence.

In this manner, a coding method and a recording and reproducingapparatus can be realized which stores a GOP sequence to suppress thedeterioration of image-quality on dubbing, and can perform compressivecoding comprising the GOP sequence same as when compressing at the lasttime.

While there has been described in connection with the preferredembodiments of the invention, it will be obvious to those skilled in theart that various changes and modifications may be aimed, therefore, tocover in the appended claims all such changes and modifications as fallwithin the true spirit and scope of the invention.

What is claimed is:
 1. A method for coding a video signal made up of aplurality of sequential video frames, comprising the steps of:providingcorrespondence information which relates color frame information valuesto types of coding, said color frame information values and said typesof coding being related on a one to one basis such that for each valueof color frame information there is only one corresponding type ofcoding; determining a value of color frame information for each saidframe and selecting the type of coding to be used on said frame byreferencing said correspondence information to find the type of codingcorresponding to said determined color frame information; and codingsaid image frames according to the coding types selected in saiddetermining step.
 2. The method according to claim 1, wherein said colorframe information is periodic with respect to said plurality ofsequential frames such that the types of coding used on said frames isalso periodic and the frames defining one period form a group ofpictures.
 3. The method according to claim 1, wherein the steps ofdetermining and coding are performed on a field by field basis.
 4. Themethod according to claim 1, wherein said coding includes performing anMPEG-type compression.
 5. The method according to claim 1, furthercomprising the step of adding to each coded frame the color frameinformation value associated with said coded frame.
 6. The methodaccording to claim 1, wherein said video signal is a component digitalvideo signal.